<extend name="Public/base"/>

<block name="header">
    <li class="active"><a href="javascript:;">安装协议</a></li>
    <li class="active"><a href="javascript:;">环境检测</a></li>
    <li class="active"><a href="javascript:;">创建数据库</a></li>
    <li><a href="javascript:;"><eq name="Think.session.update" value="1">升级<else/>安装</eq></a></li>
    <li><a href="javascript:;">完成</a></li>
</block>

<block name="body">
    <?php
        defined('SAE_MYSQL_HOST_M') or define('SAE_MYSQL_HOST_M', '127.0.0.1');
        defined('SAE_MYSQL_HOST_M') or define('SAE_MYSQL_PORT', '3306');
    ?>
    <h1>创建数据库</h1>
    <!-- 原子力量updated：更新到BT3的from样式 -->
    <form class="form-horizontal col-md-10" action="__SELF__" method="post" target="_self">
            <div class="form-group">
                <div class="col-sm-4">
                    <select class="form-control" name="db[]">
                    <option>mysql</option>
                    </select>
                </div>
                <label class="col-sm-8 control-label" style="text-align:left">数据库类型</label>
            </div>

            <div class="form-group">
                <div class="col-sm-4">
                    <input class="form-control" type="text" name="db[]" value="<defined name='SAE_MYSQL_HOST_M'>{$Think.const.SAE_MYSQL_HOST_M}<else/>127.0.0.1</defined>">
                </div>
                <label class="col-sm-8 control-label" style="text-align:left">数据库服务器，数据库服务器IP，一般为127.0.0.1</label>
            </div>

            <div class="form-group">
                <div class="col-sm-4">
                    <input class="form-control" type="text" name="db[]" value="<defined name='SAE_MYSQL_DB'>{$Think.const.SAE_MYSQL_DB}</defined>">
                </div>
                <label class="col-sm-8 control-label"  style="text-align:left">数据库名</label>
            </div>
            <div class="form-group">
                <div class="col-sm-4">
                    <input class="form-control" type="text" name="db[]" value="<defined name='SAE_MYSQL_USER'>{$Think.const.SAE_MYSQL_USER}</defined>">
                </div>
                <label class="col-sm-8 control-label" style="text-align:left">数据库用户名</label>
            </div>
            <div class="form-group">
                <div class="col-sm-4">
                    <input class="form-control" type="password" name="db[]" value="<defined name='SAE_MYSQL_PASS'>{$Think.const.SAE_MYSQL_PASS}</defined>">
                </div>
                <label class="col-sm-8 control-label" style="text-align:left">数据库密码</label>
            </div>
            <div class="form-group">
                <div class="col-sm-4">
                    <input class="form-control" type="text" name="db[]" value="<defined name='SAE_MYSQL_PORT'>{$Think.const.SAE_MYSQL_PORT}<else/>3306</defined>">
                </div>
                <label class="col-sm-8 control-label" style="text-align:left">数据库端口，数据库服务连接端口，一般为3306</label>
            </div>

            <div class="form-group">
                <div class="col-sm-4">
                    <input class="form-control" type="text" name="db[]" value="onethink_">
                </div>
                <label class="col-sm-8 control-label" style="text-align:left">数据表前缀，同一个数据库运行多个系统时请修改为不同的前缀</label>
            </div>

            <hr/>

            <h2>创始人帐号信息</h2>
            <div class="form-group">
                <div class="col-sm-4">
                    <input class="form-control" type="text" name="admin[]" value="Administrator">
                </div>
                <label class="col-sm-8 control-label" style="text-align:left">用户名</label>
            </div>

            <div class="form-group">
                <div class="col-sm-4">
                    <input class="form-control" type="password" name="admin[]" value="">
                </div>
                <label class="col-sm-8 control-label" style="text-align:left">密码</label>
            </div>

            <div class="form-group">
                <div class="col-sm-4">
                    <input  class="form-control" type="password" name="admin[]" value="">
                </div>
                <label class="col-sm-8 control-label" style="text-align:left">确认密码</label>
            </div>

            <div class="form-group">
                <div class="col-sm-4">
                    <input class="form-control" type="text" name="admin[]" value="">
                </div>
                <label class="col-sm-8 control-label" style="text-align:left">邮箱，请填写正确的邮箱便于收取提醒邮件</label>
            </div>

    </form>
</block>

<block name="footer">
    <a class="btn btn-success btn-large" href="{:U('Install/step1')}">上一步</a>
    <button id="submit" type="button" class="btn btn-primary btn-large" onclick="$('form').submit();return false;">下一步</button>
</block>
